package com.shop.controller;

import com.shop.pojo.CommonResult;
import com.shop.pojo.MenuTemplate;
import com.shop.service.IAuthService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/auths")
public class AuthController {
    @Resource
    private IAuthService authService;

    @GetMapping("/authsList")
    public CommonResult<List<MenuTemplate>> getAuthListByType(@RequestParam String type) {
        System.out.println(type + "==================");
        return authService.getAuthListByType(type);
    }
}
